using UnityEngine;
using System.Collections;
 
public class CreateObject : CharacterAction
{ 
	public GameObject prefab;
	public Transform t;

	public override void OnActionEnter (Character character)
	{
		GameObject obj = (GameObject)GameObject.Instantiate(prefab);
		obj.SetActive(true);
		Transform usingTransform = t;
		if(t == null)
			usingTransform = character.transform;
		
		obj.transform.position = usingTransform.position;
		obj.transform.rotation = usingTransform.rotation;
	}
}
 
